package com.wh.codedemon.design.pattern.simpleFactory;

/**
 * TODO
 *
 * @auther whoo7
 * @date 2024/1/1 20:59
 */
public class OrderFactory {
    public static Order createOrder(String orderType) {
        if ("food".equals(orderType)) {
            return new FoodOrder();
        } else if ("clothes".equals(orderType)) {
            return new ClothesOrder();
        }
        return new FoodOrder();
    }

}
